﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HCQ2_Model.APPModel.ParamModel;
using System.ComponentModel.DataAnnotations;

namespace HCQ2_Model
{
    /// <summary>
    ///  个人成绩模型
    /// </summary>
    public class VRScoreModel: BaseAPI
    {
        public int s_id { get; set; }
        public int user_id { get; set; }
        public string user_name { get; set; }
        [Required]
        public int file_id { get; set; }
        public string file_name { get; set; }
        [Required(ErrorMessage = "folder_name：体验项目必填项")]
        public string folder_name { get; set; }
        public decimal? score { get; set; }

        public T_VRScore ToEntity()
        {
            return new T_VRScore
            {
                user_name = this.user_name,
                user_id = this.user_id,
                file_id = this.file_id,
                file_name = this.file_name,
                folder_name = this.folder_name,
                score = this.score
            };
        }
    }
    public partial class T_VRScore
    {
        public VRScoreModel ToPOCO()
        {
            return new VRScoreModel
            {
                s_id = this.s_id,
                user_name = this.user_name,
                user_id = this.user_id,
                file_id = this.file_id,
                file_name = this.file_name,
                folder_name = this.folder_name,
                score = this.score
            };
        }
    }
}
